'use strict';

var firstQCController = require('../controllers/FirstQC.server.controller'),
	userController = require('../controllers/User.server.controller'),
	stationWorkController = require('../controllers/StationWork.server.controller'),
	workController = require('../controllers/Work.server.controller'),
    processController = require('../controllers/Process.server.controller'),
    productFlowController = require('../controllers/ProductFlow.server.controller'),
    coreController = require('../../../core/server/controllers/core.server.controller'),
    wrapperController = require('../controllers/Wrapper.server.controller'),
    kanbanController = require('../controllers/Kanban.server.controller'),
    judgeController = require('../controllers/Judge.server.controller');
    PackingStorageController = require('../controllers/PackingStorage.server.controller');


module.exports = function(app) {
	app.route('/api/FirstQC/getTerminalWorkLocationWorks').post(firstQCController.getTerminalWorkLocationWorks);
	app.route('/api/FirstQC/getFirstQCDefaultInfo').post(function(req, res){
		firstQCController.getFirstQCDefaultInfo.call(firstQCController, req, res);
	});
    app.route('/api/FirstQC/setFirstQCInfo').post(firstQCController.setFirstQCInfo);
    app.route('/api/FirstQC/getBadType').post(firstQCController.getBadType);

    app.route('/api/User/getUserRoles').post(userController.getUserRoles);

    app.route('/api/Process/processScan').post(processController.processScan);
    app.route('/api/Process/insertBizRecordST').post(processController.insertBizRecordST);
    app.route('/api/Process/updateBizRecordST').post(processController.updateBizRecordST);

    app.route('/api/ProductFlow/getProductFlow').post(productFlowController.getProductFlow);

    app.route('/api/Wrapper/getWrapperInfo').post(wrapperController.getWrapperInfo);
    app.route('/api/Wrapper/setWrapperMeasure').post(wrapperController.setWrapperMeasure);
    app.route('/api/core/findAllBarcodeMasterByLotNum').post(coreController.findAllBarcodeMasterByLotNum);

    app.route('/api/Kanban/createKanban').post(kanbanController.createKanban);
    app.route('/api/Kanban/GetUpStreamKanban').post(kanbanController.GetUpStreamKanban);
    app.route('/api/Kanban/GetDownStreamKanban').post(kanbanController.GetDownStreamKanban);
    app.route('/api/Kanban/UdpatePIckUpQty').post(kanbanController.UdpatePIckUpQty);
    app.route('/api/Judge/specialScanCode').post(judgeController.specialScanCode);
    app.route('/api/Judge/decideScanCode').post(judgeController.decideScanCode);
    app.route('/api/Judge/doJudge').post(judgeController.doJudge);
    app.route('/api/Judge/getBadMasters').post(judgeController.getBadMasters);
    app.route('/api/PackingStorage/getAssemblyBarcodeData').post(PackingStorageController.getAssemblyBarcodeData);
}
